home *** CD-ROM | disk | FTP | other *** search
- ; -----------------------------------------------------------------------------
-
- ; Source : InstallPatchCX
- ; Project : PatchCX
- ; Author : Martin Hauner
- ; EMail : drizzt@trashcan.mcnet.de
- ; Copyright : Martin Hauner 1996
- ; Revision : $Revision: 1.1 $
- ; Language : Installer
- ; Remarks : Tabsize - 4
- ; Remarks :
- ; History :
- ;
- ; 07.07'96 - started..
- ;
- ; -----------------------------------------------------------------------------
-
-
-
- ; -----------------------------------------------------------------------------
- ;
- ; set strings according the @language variable.
- ;
-
- ; -------------------------------------------------------------------------
- ;
- ; english is the default language.
- ;
- ; -------------------------------------------------------------------------
- ; misc strings.
-
- ( set #wrongversion.txt
-
- ( cat "\n Attention!\n You have an old version of the program 'Installer'.\n"
- "The installation procedure needs at least Installer 42.9.\n\n"
- "Please update the Installer program.\n"
- );endcat
- );endset
-
-
- ; -------------------------------------------------------------------------
- ; strings for #dirPatchCX
-
- ( set #askdirPatchCX.txt
-
- ( cat "Where do you like to install PatchCX? ( no directory will be created )"
- );endcat
- );endset
-
- ( set #askdirPatchCX.helptxt
-
- ( cat "\nIf you choose the given directory, PatchCX gets started automatically "
- "during the boot process.\n\n"
- );endcat
- );endset
-
-
-
- ; -------------------------------------------------------------------------
- ; strings for #dirFDfiles
-
- ( set #askdirFDfiles.txt
-
- ( cat "Select the directory where you keep the fd files."
- );endcat
- );endset
-
- ( set #askdirFDfiles.helptxt
-
- ( cat "\nRead the PatchCX.guide for more information about fd files.\n\n"
- );endcat
- );endset
-
-
- ; -------------------------------------------------------------------------
- ; strings for starting multiview with the PatchCX.guide
-
- ( set #startGuide.txt
-
- ( cat "do you like to read the PatchCX.guide NOW?"
- );endcat
- );endset
-
- ( set #startGuide.helptxt
-
- ( cat "\nSimple question, isn't it? Make your choice.\n\n"
- );endcat
- );endset
-
-
- ; -------------------------------------------------------------------------
- ; strings for selecting a dir for the guide file
-
- ( set #askdirGuide.txt
-
- ( cat "Where do you like to install the PatchCX.guide?"
- );endcat
- );endset
-
- ( set #askdirGuide.helptxt
-
- ( cat "\nThe directory will be stored in PatchCX' 'guidepath' tooltype "
- "( Allthough PatchCX doesn't use it so far ).\n"
- );endcat
- );endset
-
-
- ; -------------------------------------------------------------------------
- ; strings for copying PatchCX/PatchCX.info
-
- ( set #copyPatchCX.txt
-
- ( cat "Copying PatchCX & PatchCX.info to %s ."
- );endcat
- );endset
-
-
-
- ; -------------------------------------------------------------------------
- ; strings for copying PatchCX.guide/PatchCX.guide.info
-
- ( set #copyGuide.txt
-
- ( cat "Copying PatchCX.guide to %s ."
- );endcat
- );endset
-
-
-
- ; -------------------------------------------------------------------------
- ;
- ; here follows an example, how to localize this script. We overwrite the
- ; english strings with translated strings if we know the @language.
- ;
-
- ; -------------------------------------------------------------------------
- ;
- ; deutsch
- ;
-
- ; ( if ( = @language "deutsch" )
- ; (;then
-
- ;
- ; Note:
- ;
- ; insert here the above commands, which set the english text, and translate them.
- ;
-
- ;
- ; here is a small example for the german translation of #wrongversion.txt
- ;
- ; ( set #wrongversion.txt
- ; ( cat "\n Achtung!\n Sie haben ein alte Version des 'Installer'-Programms.\n"
- ; "Die Installation benötigt mindestens die Installer-Version 42.9.\n\n"
- ; "Bitte, erneuern Sie das Installer-Programm.\n"
- ; );endcat
- ; );endset
-
- ; );endthen
- ; );endif
-
-
- ; -----------------------------------------------------------------------------
-
-
-
-
-
- ; -----------------------------------------------------------------------------
- ;
- ; ask for the directory, where we should install something..
- ;
- ; notes:
- ; #dir is the result.
- ;
-
- ( procedure mrh_askdir #default #prompt #help
-
- ( set #dir
- ( askdir
- ( default #default )
- ( prompt #prompt )
- ( help ( cat #help @askdir-help ) )
- );endaskbool
- );endset
-
- );endprocedure
-
- ; -----------------------------------------------------------------------------
-
-
- ; -----------------------------------------------------------------------------
- ;
- ; open a guide with multiview.
- ;
- ; notes:
- ; #error is the result
- ;
-
- ( procedure mrh_openguide #guide #prompt #help
-
- ( set #error
- ( run ( "sys:utilities/multiview %s" #guide )
- ( prompt #prompt )
- ( help #help )
- ( confirm 1 )
- ( safe )
- );endrun
- );endset
-
- );endprocedure
-
- ; -----------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ; -----------------------------------------------------------------------------
- ;
- ; main...
- ;
-
- ( if ( > @installer-version 0 )
- (;then
-
- ; -------------------------------------------------------------------------
- ; installer version is ok :-)
-
- ( complete 0 )
-
- ( set #dirPatchCX ( mrh_askdir "Sys:WBStartup" #askdirPatchCX.txt #askdirPatchCX.helptxt ) )
-
- ( complete 10 )
-
- ( set #dirFDfiles ( mrh_askdir "fd:" #askdirFDfiles.txt #askdirFDfiles.helptxt ) )
-
- ( complete 20 )
-
- ( set #dirGuide ( mrh_askdir "" #askdirGuide.txt #askdirGuide.helptxt ) )
-
- ( complete 30 )
-
- ( copyfiles
- ( prompt ( #copyPatchCX.txt #dirPatchCX ) )
- ( help @copyfiles-help )
- ( source "PatchCX" )
- ( infos )
- ( dest #dirPatchCX )
- ( files )
- ;( confirm 1 )
- );endcopyfiles
-
- ( complete 40 )
-
- ( copyfiles
- ( prompt ( #copyGuide.txt #dirGuide ) )
- ( help @copyfiles-help )
- ( source "PatchCX.guide" )
- ( infos )
- ( dest #dirGuide )
- ( files )
- ;( confirm 1 )
- );endcopyfiles
-
- ( complete 50 )
-
- ( tooltype
- ( dest ( tackon #dirPatchCX "PatchCX" ) )
- ( settooltype "fdpath" #dirFDfiles )
- ( settooltype "guidepath" ( tackon #dirGuide "PatchCX.guide" ) )
- ( noposition )
- );endtooltype
-
-
- ( complete 60 )
- ( complete 70 )
- ( complete 80 )
- ( complete 90 )
-
- ( mrh_openguide "PatchCX.guide" #startGuide.txt #startGuide.helptxt )
-
- ( complete 100 )
-
- ( set @default-dest #dirPatchCX )
-
- );endthen
- (;else
-
- ; -------------------------------------------------------------------------
- ; installer version is to old :-(
-
- ( message #wrongversion.txt )
- ( exit (quiet) )
-
- );endelse
- );endif
-
- ; -----------------------------------------------------------------------------
-